{template '_header'}
<div class="page-header">
    当前位置：<span class="text-primary">添加门店分类</span>
</div>
<div class="page-content">
    {ifp 'store.category.add'}
    <div class="page-toolbar">
        <a class="btn btn-primary" href="{php echo webUrl('store/category/detail');}">添加门店分类</a>
    </div>
    {/if}
    {if count($all)>0}
    <form action="" method="post" class="form-validate form-horizontal ">
        <table class="table table-hover table-responsive">
            <thead>
            <tr>
                <th>门店分类名称</th>
                <th style="width: 70px;">操作</th>
            </tr>
            </thead>
            <tbody>
            {loop $all $k $v}
            <tr>
                <td>{$v['name']}</td>
                <td>
                    {ifp 'store.category.view|store.category.edit'}
                        <a class="btn btn-default btn-sm btn-op btn-operation" href="{php echo webUrl('store/category/detail',array('id'=>$v['id']));}">
                            <span data-toggle="tooltip" data-placement="top" title="" data-original-title="编辑">
                                     <i class='icow icow-bianji2'></i>
                                </span>
                        </a>
                    {/if}
                    {ifp 'store.category.delete'}
                        <a class="btn btn-default btn-sm btn-op btn-operation" data-toggle="ajaxRemove" href="{php echo webUrl('store/category/delete',array('id'=>$v['id']));}" title="删除" data-confirm="确认删除此门店组吗？">
                             <span data-toggle="tooltip" data-placement="top" title="" data-original-title="删除">
                                     <i class='icow icow-shanchu1'></i>
                                </span>
                        </a>
                    {/if}
                </td>
            </tr>
            {/loop}
            </tbody>
        </table>
    </form>
    {else}
    <div class="panel panel-default">
        <div class="panel-body empty-data">暂时没有门店分类!</div>
    </div>
    {/if}
</div>
{template '_footer'}